{include file="public/header" /}

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <fieldset id="searchFieldset_currentTableRenderId" class="table-search-fieldset">
                        <legend>条件搜索</legend>
                        <form class="layui-form layui-form-pane form-search">
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">申请状态</label>
                                <div class="layui-input-inline">
                                    <select name="status">
                                        <option value="">商家状态</option>
                                        <option value="1" {if !empty(input('get.status')) &&
                                            input('get.status')==1}selected{/if}>正常</option>
                                        <option value="2" {if !empty(input('get.status')) &&
                                            input('get.status')==2}selected{/if}>待审核</option>
                                        <option value="3" {if !empty(input('get.status')) &&
                                            input('get.status')==2}selected{/if}>驳回</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">店铺名称|账号</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="title" placeholder="商家名称|账号" value="{:input('get.title')}"
                                        autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="sreach">搜索</button>
                            </div>
                        </form>
                    </fieldset>
                </div>
                <div class="layui-card-header">
                    共有数据：<strong id="count">{$list->total()}</strong> 条
                </div>
                <div class="layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                            <tr>
                                <th>
                                    <div class="layui-table-cell">ID</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">店铺|个人姓名</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">身份证|营业执照号</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">联系电话</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">服务区域</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">状态</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">操作</div>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $list as $v}
                            <tr>
                                <td>
                                    <div class="layui-table-cell">{$v.id|default=''}</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">{$v.name|default=''}</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">{$v.cards|default=''}</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">{$v.mobile|default=''}</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">
                                        {$v.province_name|default=''}{$v.city_name|default=''}{$v.area_name|default=''}{$v.street_name|default=''}
                                    </div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">
                                        {if $v.status == 1}待联系{else}已联系{/if}
                                    </div>
                                </td>
                                <td class="td-manage">
                                    <div class="layui-table-cell">
                                        {if $v.status == 1}
                                        <a title="联系客户" onclick="open_dels2(this,'/shop/businesssqstr','{$v.id}',2)"
                                            href="javascript:;" class="layui-btn-normal layui-btn layui-btn-sm">
                                            已联系客户
                                        </a>{else}已联系{/if}

                                    </div>
                                </td>

                            </tr>
                            {/foreach}

                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page">
                        {$list->render()|raw}
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
<script>
    function money_edit(title, url, id) {
        layer.prompt({
            formType: 0,
            value: 0,
            title: title,
        }, function (value, index, elem) {
            $.ajax({
                type: 'post',
                url: url,
                data: { id: id, money: value },
                success: function (res) {
                    if (res.code == 0) {
                        layer.msg(res.msg, { icon: 6, time: 1000 }, function () {
                            layer.close(index);
                            // 获得frame索引
                            location.reload();
                        });
                    } else {
                        layer.msg(res.msg, { icon: 2, time: 1000 });
                    }
                }
            });
            return false;

        });
    }
    layui.use(['form', 'upload'], function () {
        var $ = layui.jquery
            , form = layui.form
            , layer = layui.layer;
    });
</script>
<script>
    layer.photos({
        photos: '#layer-photos'
        , anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
    });
</script>
{include file="public/footer"}